<% if @site.pages.length > 0 %>
<div id="nav"> 
    <% for page in @site.pages %>
	<div class="nav_button"><%= link_to_unless (!@page.nil? && page.title == @page.title), page.title, :controller => 'site', :action => 'site_show', :site_directory => @site, :page_title => page %></div>
    <% end %>
    <% if @account && @site.can_be_edited_by_user?(@account.login) %>
        <div id="new_page" class="nav_button"><%= link_to "New page...", :controller => 'page', :action => 'page_new', :site_directory => @site %></div>
    <% end %>
</div>
<% end %>